/* ============================================
   LEGAL PAGES REDESIGN – Rina & Co. Edition
   Enhanced with gold accents, modern card,
   and full mobile responsiveness
   ============================================ */

/* Import Montserrat & Playfair (already in HTML) */

.legal-page {
    background: linear-gradient(135deg, rgba(252, 246, 197, 0.4) 0%, #ffffff 100%);
    padding: 130px 0 5rem;
    min-height: 100vh;
    position: relative;
    font-family: 'Montserrat', sans-serif;
}

/* Subtle gold speckles pattern */
.legal-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(223, 180, 41, 0.08) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 2;
}

/* Page header with gold gradient */
.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.legal-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary, #0a192f);
    margin-bottom: 0.5rem;
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.legal-header h1::after {
    content: '';
    display: block;
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
    margin: 0.8rem auto 0;
    border-radius: 4px;
}

.legal-header .effective-date {
    font-size: 1.1rem;
    color: #5a6a7a;
    background: rgba(223, 180, 41, 0.1);
    display: inline-block;
    padding: 0.5rem 2rem;
    border-radius: 40px;
    border: 1px solid rgba(223, 180, 41, 0.3);
    backdrop-filter: blur(5px);
    margin-top: 1rem;
}

.legal-header .effective-date i {
    color: var(--secondary);
    margin-right: 8px;
}

/* Main content card */
.legal-content {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(223, 180, 41, 0.25);
    border-radius: 32px;
    padding: 3.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(223, 180, 41, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.legal-content:hover {
    box-shadow: 0 30px 60px -12px rgba(223, 180, 41, 0.2), 0 0 0 2px rgba(223, 180, 41, 0.2);
    transform: translateY(-4px);
}

/* Section headings with icons */
.legal-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--primary, #0a192f);
    margin: 2.8rem 0 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid rgba(223, 180, 41, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-content h2:first-of-type {
    margin-top: 0;
}

.legal-content h2 i {
    color: var(--secondary);
    font-size: 2rem;
    background: rgba(223, 180, 41, 0.1);
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(223, 180, 41, 0.3);
}

.legal-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gold-dark, #b8860b);
    margin: 2rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-content h3 i {
    color: var(--secondary);
    font-size: 1.3rem;
    opacity: 0.8;
}

/* Paragraphs */
.legal-content p {
    line-height: 1.9;
    margin-bottom: 1.4rem;
    color: #2d3e50;
    font-size: 1.05rem;
}

/* Lists */
.legal-content ul {
    margin: 1.2rem 0 2rem 2rem;
    list-style-type: none;
}

.legal-content li {
    margin-bottom: 0.8rem;
    line-height: 1.8;
    color: #2d3e50;
    position: relative;
    padding-left: 1.8rem;
}

.legal-content li::before {
    content: '●';
    color: var(--secondary);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

/* Address block */
.legal-content address {
    font-style: normal;
    background: linear-gradient(145deg, #faf8f0, #ffffff);
    border-left: 6px solid var(--secondary);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    margin-top: 2.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(223, 180, 41, 0.2);
    font-size: 1.1rem;
    line-height: 1.9;
    color: #1e2b3a;
}

.legal-content address strong {
    color: var(--primary);
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Inline emphasis */
.legal-content strong {
    color: var(--primary);
    font-weight: 600;
}

/* Table of contents (optional) */
.legal-toc {
    background: rgba(223, 180, 41, 0.05);
    border-radius: 20px;
    padding: 1.8rem 2.2rem;
    margin-bottom: 2.5rem;
    border: 1px dashed rgba(223, 180, 41, 0.4);
}

.legal-toc h4 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-toc ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin: 0;
    padding: 0;
}

.legal-toc li {
    flex: 1 1 200px;
    padding-left: 0;
    margin: 0;
}

.legal-toc li::before {
    display: none;
}

.legal-toc a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted var(--secondary);
    transition: color 0.3s;
}

.legal-toc a:hover {
    color: var(--secondary);
}

/* ============================================
   EXTRA MOBILE RESPONSIVE FIXES
   These overrides ensure perfect display on small devices
   ============================================ */

@media (max-width: 992px) {
    .legal-page {
        padding-top: 110px;
    }
    .legal-content {
        padding: 2.5rem;
    }
    .legal-header h1 {
        font-size: 2.6rem;
    }
}

@media (max-width: 768px) {
    .legal-page {
        padding-top: 90px;
    }
    .legal-content {
        padding: 2rem;
        border-radius: 24px;
    }
    .legal-header h1 {
        font-size: 2.2rem;
    }
    .legal-header .effective-date {
        font-size: 1rem;
        padding: 0.4rem 1.2rem;
    }
    .legal-content h2 {
        font-size: 1.6rem;
        gap: 8px;
    }
    .legal-content h2 i {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    .legal-content h3 {
        font-size: 1.3rem;
    }
    .legal-content ul {
        margin-left: 1rem;
    }
    .legal-toc ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    /* Reduce overall container padding */
    .legal-page .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Make the header title smaller and prevent overflow */
    .legal-header h1 {
        font-size: 1.8rem !important;
        word-break: break-word;
    }

    /* Adjust effective date pill */
    .legal-header .effective-date {
        font-size: 0.9rem !important;
        padding: 0.4rem 1rem !important;
        white-space: normal;
        line-height: 1.4;
    }

    /* Card padding reduced further */
    .legal-content {
        padding: 1.5rem 1.2rem !important;
        border-radius: 20px !important;
    }

    /* Make headings more compact */
    .legal-content h2 {
        font-size: 1.5rem !important;
        gap: 8px !important;
        margin: 1.8rem 0 1rem !important;
    }

    .legal-content h2 i {
        width: 34px !important;
        height: 34px !important;
        font-size: 1.2rem !important;
    }

    .legal-content h3 {
        font-size: 1.2rem !important;
    }

    /* Adjust paragraph and list font size */
    .legal-content p,
    .legal-content li {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
    }

    /* Lists: reduce left margin */
    .legal-content ul {
        margin-left: 0.5rem !important;
    }

    .legal-content li {
        padding-left: 1.5rem !important;
    }

    /* Table of contents (if used) */
    .legal-toc {
        padding: 1.2rem !important;
    }

    .legal-toc ul {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .legal-toc li {
        flex: none !important;
    }

    .legal-toc a {
        font-size: 0.95rem !important;
    }

    /* Address block */
    .legal-content address {
        padding: 1.2rem !important;
        font-size: 0.95rem !important;
        word-break: break-word;
    }

    .legal-content address strong {
        font-size: 1rem !important;
    }
}

/* Extra small devices (phones less than 400px) */
@media (max-width: 400px) {
    .legal-header h1 {
        font-size: 1.6rem !important;
    }

    .legal-content h2 {
        font-size: 1.3rem !important;
        flex-wrap: wrap; /* allow icon and text to stack if needed */
    }

    .legal-content h2 i {
        width: 30px !important;
        height: 30px !important;
        font-size: 1rem !important;
    }

    .legal-content {
        padding: 1rem !important;
    }

    .legal-content p,
    .legal-content li {
        font-size: 0.9rem !important;
    }
}